package com.kly.user.enums;


/**
 * 用户操作：1-拉黑 2-取消拉黑 3-隐藏 4-举报
 * @author linqu
 */
public enum UserOpActionEnum {

    ADD_BLACK_LIST(1, "add black list", "拉黑"),
    REMOVE_BLACK_LIST(2, "remove black list", "取消拉黑"),
    HIDE_USER(3, "hide user", "隐藏"),
    REPORT_USER(4, "report user", "举报")
    ;


    private final int type;

    private final String Value;

    private final String description;


    UserOpActionEnum(int type, String value, String description) {
        this.type = type;
        Value = value;
        this.description = description;
    }

    public int getType() {
        return type;
    }

    public String getValue() {
        return Value;
    }

    public String getDescription() {
        return description;
    }


    public static UserOpActionEnum fromType(int type) {
        for (UserOpActionEnum userStatus : values()) {
            if (userStatus.getType() == type) {
                return userStatus;
            }
        }
        return null;
    }

}
